<?php
/**
 * Created by PhpStorm.
 * User: Lin
 * Date: 2017/3/12 0012
 * Time: 下午 20:59
 */
Class FooterWidget extends Widget{
    public function render($data)
    {
        $userId=session('userId');
        $data['cartCount']=M('cart')->where(array('user_id'=>$userId))->count();
        return $this->renderFile('',$data);
    }
}